﻿@model VoiceAd.Models.tblStation
@using System.Data;
@using System.Linq;
@using System.Web.Mvc;
@using VoiceAd.Models;
@using VoiceAd.DAL;
@{
    ViewBag.Title = "Details Station";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<h2>
    Details Station</h2>
<fieldset>
    <legend>Thông tin</legend>
    <div class="display-label">
        Tên đăng nhập</div>
    <div class="display-field">@Model.UserName</div>
    <div class="display-label">
        Tên nhà đài</div>
    <div class="display-field">@Model.StationName</div>
    <div class="display-label">
        Quận/huyện</div>
    <div class="display-field">
        @{         
            IDistrictRepository districtRepository = new DistrictRepository(new dbVoiceAdDataContext());
            tblDistrict tbl = districtRepository.GetDistrictById(Convert.ToInt32(Model.DistrictId));
            ViewBag.DistrictName = tbl.DistrictName;      
        }
        @Html.Raw(ViewBag.DistrictName);
    </div>
    <div class="display-label">
        Địa chỉ</div>
    <div class="display-field">@Model.Address</div>
</fieldset>
<p>
    @Html.ActionLink("Chỉnh sửa", "EditStation", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Station")
</p>
